@import '../../../styles/var.scss';
@import '../../../styles/mixins.scss';

.m-product-card {
  position: relative;
  width: 100%;
  border-radius: 16px;
  background-color: #fff;
  overflow: hidden;

  &-header {
    width: 100%;
    height: 340px;

    &-media {
      width: 100%;
      height: 100%;
    }
  }

  &-content {
    padding: 8px 16px;

    &-title {
      font-size: $font-size-base;
      color: $text-color-main;
      font-weight: 500;
      @include ellipsis(2);
    }

    &-tag {
      &-group {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 8px;
        margin-top: 16px;
      }
    }

    &-price {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 12px;

      &-tip {
        font-size: $font-size-xsmall;
        color: $text-color-secondary;
        font-weight: 400;
      }
    }

    &-info {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 8px;

      &-company {
        flex: 1;
        overflow: hidden;

        .m-space-item {
          overflow: hidden;
        }

        .m-company-name {
          font-size: $font-size-small;
          @include ellipsis;
        }
      }

      &-favorites {
        font-size: $font-size-small;
        color: $text-color-secondary;
        line-height: 1em;
      }
    }
  }

  &-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);

    &-tag {
      position: absolute;
      top: 140px;
      left: 50%;
      transform: translateX(-50%);
      @include flex-center;
      width: 136px;
      height: 56px;
      padding: 8px 32px;
      border-radius: 32px;
      background-color: #fff;
    }
  }
}
